package cn.edu.mapper;

import cn.edu.bean.Doctor;
import org.apache.ibatis.annotations.Param;
import cn.edu.bean.Role;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Devin on 2019/1/7.
 */
@Repository
public interface DoctorMapper {
    Doctor loadUserByUsername(String username);

    List<Role> getRolesByDoctorId(Long id);

    int doctorReg(@Param("username") String username, @Param("password") String password);

    List<Doctor> getDoctorsByKeywords(@Param("keywords") String keywords);

    int updateDoctor(Doctor doctor);

    int deleteRoleByDoctorId(Long doctorId);

    int addRolesForDoctor(@Param("doctorId") Long doctorId, @Param("rids") Long[] rids);

    Doctor getDoctorById(Long doctorId);

    int deleteDoctor(Long doctorId);

    List<Doctor> getAllDoctor(@Param("currentId") Long currentId);
}
